<div class="tms-main-page-function">
    <div class="main-content" style="height:auto">
        <div class="page-function">
            <ul class="wms-wbm-fun-left">
                <button class="layui-btn" ng-click="createOutboundPlanClick()">生成备料任务</button>
                <button class="layui-btn" ng-click="shipmentChangClick()" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">任务变更</button>
                <button class="layui-btn" ng-click="exportExcelClick()" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">导出</button>
            </ul>
            <div class="wms-wbm-fun-right">
                <input type="text" placeholder="VIN码-->回车查询" ng-model="search.vdVin" ng-keydown="searchListKeyDown($event)" class="search-input">
                <button class="layui-btn" ng-click="moreClick()" ng-bind="moreText">更多条件</button>
                <i class="iconfont icon-shuaxin layui-anim layui-anim-loop layui-anim-rotate wms-refresh" ng-click="refreshClick()" refresh></i>
            </div>
        </div>
        <div class="otherForm" ng-show="otherForm" >
            <ul>
                <li>
                    <div class="otherFormItem">
                        <div>计划装车道</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.estimateLane">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.elName"></span>
                                </ui-select-match>
                                <ui-select-choices repeat="estimateLane in dropDownList.estimateLane">
                                    <span ng-bind="estimateLane.elName"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>
                    <div class="otherFormItem">
                             <div>备料编码</div>
                        <div>
                           <input type="text" class="layui-input" ng-model="search.ppPreparationMaterialNo"/>
                         </div>
                    </div>

                    <div class="otherFormItem">
                        <div>客户运单号</div>
                        <div>
                            <input type="text" class="layui-input" ng-model="search.ppOrderNo"/>
                        </div>
                    </div>
                </li>

                <li>
                    <div class="otherFormItem">
                        <div>创建时间</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd" ng-model="search.gmtCreateStart" ng-click="Tools.modelAssignment($event,this)" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>至</div>
                        <div>
                            <input type="text" lay-verify="date" placeholder="yyyy-mm-dd" ng-model="search.gmtCreateEnd" ng-click="Tools.modelAssignment($event,this)" autocomplete="off" class="layui-input" onclick="layui.laydate({elem: this,format:'YYYY-MM-DD',choose : angular.element(this).scope().Tools.modelAssignment,scope:angular.element(this).scope()})">
                        </div>
                    </div>
                    <div class="otherFormItem">
                        <div>备料状态</div>
                        <div>
                            <ui-select ng-model="dropDownDefault.outboundStatus">
                                <ui-select-match>
                                    <span ng-bind="$select.selected.name"></span>
                                </ui-select-match>
                                <ui-select-choices repeat="outboundStatus in (dropDownList.outboundStatus | filter: $select.search) track by outboundStatus.value">
                                    <span ng-bind="outboundStatus.name"></span>
                                </ui-select-choices>
                                <ui-select-no-choice>
                                    没有加载到数据
                                </ui-select-no-choice>
                            </ui-select>
                        </div>
                    </div>
                </li>

                <li>
                    <div class="otherFormItem otherFormItemButton">
                        <button class="layui-btn" ng-click="searchClick()">查询</button>
                        <button class="layui-btn" ng-click="resetClick()">重置</button>
                    </div>
                </li>
            </ul>
        </div>
        <div class="layui-form">
            <table class="layui-table wms_wbm_main_table minScreen serial outboundTable">
                <tbody>
                    <tr>
                        <th>
                            <input type="checkbox" name="" lay-skin="primary" lay-filter="allChoose">
                            <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                                <i class="layui-icon"></i>
                            </div>
                        </th>
                        <th>备料编号</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">发运指令号</th>
                        <th>备料员</th>
                        <th>创建时间</th>
                        <th>计划装车道</th>
                        <th>计划装车时间</th>
                        <th>预计完成时间</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">实际进场时间</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">实际出场时间</th>
                        <th>备料状态</th>
                    </tr>
                    <tr ng-repeat="outboundOrder in outboundOrderList" ng-click="selectItemClick(outboundOrder,$event)">
                        <td>
                            <input type="checkbox" name="ckValue" ng-value="$index" lay-skin="primary" />
                            <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                                <i class="layui-icon"></i>
                            </div>
                        </td>
                        <td ng-bind="outboundOrder.ppPreparationMaterialNo"></td>
                        <td ng-bind="outboundOrder.ppGroupDispNo" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                        <td ng-bind="outboundOrder.ppOperationStaff"></td>
                        <td ng-bind="outboundOrder.gmtCreate"></td>
                        <td ng-bind="outboundOrder.ppEstimateLane"></td>
                        <td ng-bind="outboundOrder.ppEstimateLoadingTime"></td>
                        <td ng-bind="outboundOrder.ppEstimateFinishTime"></td>
                        <td ng-bind="outboundOrder.ppGateInTime" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                        <td ng-bind="outboundOrder.ppGateOutTime" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                        <td ng-bind="outboundOrder.ppStatus | outboundStatusFilter"></td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="admin-table-page" style="text-align: center;">
            <div id="pages" class="page">
            </div>
        </div>
    </div>

    <div class="main-content" style="height:50%">
        <div class="page-function">
            <ul class="wms-wbm-fun-left">
                <button class="layui-btn" ng-click="addCarClick()" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">增车</button>
            </ul>
        </div>
        <div class="otherForm" ng-show="otherForm">
        </div>
        <div class="layui-form scrollTable">
            <table class="layui-table wms_wbm_main_table minScreen outboundDetailTable">
                <tbody>
                    <tr>
                        <th>VIN码</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">交接单号</th>
                        <th>车型名称</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">物料编码</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">备料库区</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1">备料库位</th>
                        <th  ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">车型描述</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">客户运单号</th>
                        <th>出库状态</th>
                        <th>备料司机</th>
                        <th>完成时间</th>
                        <th ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1" >操作</th>
                    </tr>
                    <tr ng-repeat="outboundOrderDetail in outboundOrderDetailList">
                        <td ng-bind="outboundOrderDetail.vdVin"></td>
                        <td ng-bind="outboundOrderDetail.hoHandoverNumber" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.vdVehicleName"></td>
                        <td ng-bind="outboundOrderDetail.wndMaterialCode" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.alSourceZoneCode" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.alSourceLocCode" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.JM_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.vdVehicleDesc" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.vdWaybillNo" ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1"></td>
                        <td ng-bind="outboundOrderDetail.vdOutstockStatus | outboundOutStatusFilter"></td>
                        <td ng-bind="outboundOrderDetail.driverName"></td>
                        <td ng-bind="outboundOrderDetail.gmtUpdate"></td>
                        <td ng-if="userInfo.whCode.indexOf(constant.userWarehouseType.UNLCN_XN_) != -1">
                            <a ng-show="outboundOrderDetail.deleteFlag == 0" href="javascript:void(0);" style="color: #de531a" ng-click="deleteCarClick(outboundOrderDetail)">删除</a>
                            <span ng-show="outboundOrderDetail.deleteFlag == 1" style="color: #9d9d9d">删除</span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>